<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
    
    <xsl:output method="html" omit-xml-declaration="yes" indent="yes" />
    
    <xsl:template match="org.keyintegrity.webbeans.demo.beans.ComplexJavaBean">
    
        <table>
            <thead>
                <tr style="background-color: maroon; color: white;">
                    <xsl:element name="th">
                        <xsl:attribute name="colspan"><xsl:value-of select="count(*)"/></xsl:attribute>
                        <xsl:text>Editing Person Info</xsl:text>
                    </xsl:element>
                </tr>
                <tr style="background-color: silver;">
                    <xsl:for-each select="*">
                        <th><xsl:value-of select="name()"/></th>
                    </xsl:for-each>
                </tr>
            </thead>
            <tbody>
                <tr>
                    <xsl:for-each select="*">
                        <td><xsl:copy-of select="*"/></td>
                    </xsl:for-each>
                </tr>
            </tbody>
        </table>
        
    </xsl:template>
    
</xsl:stylesheet>